#ifndef OP_GROUP_BY_INPUT
#define OP_GROUP_BY_INPUT

#include <vector>
#include "proto/internal.pb.h"
#include "Op.h"
#include "common.h"

class OpInput: public Op {
private:
	short number_of_producers; // liczba workerow, ktora jeszcze nie przyslala wszystkiego
	short row_size;
	std::vector<Type> types;
	char* rows; // do tego bufora czytamy

public:
	OpInput(const internal::InputOperation& operation);

	// -1 on EOF or value indicating number of rows
	int doit();

	std::vector<Type> getTypes() const {
		return types;
	}

	char* getRowsBuffer() {
		return rows;
	}
};

#endif
